package com.company.common.server.bus;

import com.alibaba.fastjson.JSONObject;
import com.company.common.server.config.cloud.ProjectConfig;
import com.company.common.server.config.mq.constant.MQTopicKeys;
import com.company.common.server.config.mq.models.MQSysOpLogModel;
import com.company.common.server.config.mq.utils.SaasMqUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SysOpLogService {

    @Autowired
    private ProjectConfig projectConfig;

    public void addOpSysLog(MQSysOpLogModel entity){
        SaasMqUtils.produce(MQTopicKeys.MQ_SysOp_Topic, JSONObject.toJSONString(entity),
                false,projectConfig);
    }

}
